


**************************************************************************************************
**************************************************************************************************
* 					F I N A L     M O D E L S
**************************************************************************************************
**************************************************************************************************

* Lucas Leemann (lleemann@gmail.com) & Isabela Mares (isabela.mares@yale.edu)

*  doi:10.1017/S0022381613001394
* Leemann and Mares. 2014. "The Adoption of Proportional Representation" Journal of Politics 76(2): 461-478.



clear
use "/Users/lleemann/Dropbox/Germany 1870-1914/Proportional Representation/Code and data/pr vote data final_3.dta"

set more off

gen dummy_svd= rokkan2_svd>0
* generate a party level skill ratio measure
*egen skills_party = mean(skill_ratio), by(partyNUM)
*bysort largeregion: egen skill_region = mean(skill_ratio)


*label var voteshare_second  "SECOND*SOC.VOTE"
*label var skill_ratio "SKILL"
*label var voteshare_right "RIGHT MARGIN*SOC.VOTE"
*label var catholics "CATHOLICS"

label define pNUM 1 "Social Democrats" 2 "Free Liberals" 3 "Zentrum" 4 "National Liberals" 5 "Conservatives" 6 "Minorities" 7 "Independents"
label values partyNUM pNUM



**************************************************************************************************
* MODELS							- -	T A B L E  2 - -
*	with socialdem11912
*	(all models without skill_ratio_agri)


set more off
* basic model - probit -- EMPTY 
probit prvote1  if prvote1<2
estimates store modem
estat clas

** Model 1
probit prvote1 rokkan2_svd  socialdem11912 skill_ratio  if prvote1<2
estimates store mod1
estat clas
* 95.07%


** Model 2 
probit prvote1 rokkan2_svd  socialdem11912 skill_ratio second catholic right_margin  nonagri_ziblatt_new if prvote1<2
estimates store mod2
estat clas
* 94.72%


** Model 3
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  nonagri_ziblatt_new if prvote1<2
estimates store mod3
estat clas
* 94.72%


** Model 4
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  nonagri_ziblatt_new prussia bavaria sachsen wurttenberg baden if prvote1<2
estimates store mod4
estat clas
* 96.48%


** Model 4a (mentioned in footnote)
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  prussia bavaria sachsen wurttenberg baden if prvote1<2
estat clas
* 96.48%

esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second second  catholic nonagri_ziblatt_new skill_ratio  right_margin   prussia bavaria sachsen wurttenberg baden)
esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label tex stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second second  catholic nonagri_ziblatt_new skill_ratio  right_margin   prussia bavaria sachsen wurttenberg baden)



**************************************************************************************************
* MODELS							- -	T A B L E  3 - -
*	(hierarchical)

set more off
* basic model - probit -- EMPTY 
xtprobit prvote1  if prvote1<2, i(partyNUM)
estimates store modem

** Model 1
xtprobit prvote1 rokkan2_svd  socialdem11912 skill_ratio  if prvote1<2, i(partyNUM)
estimates store mod12
predict yhat_mod1_lin
gen yhat_mod1_out= yhat_mod1_lin>0
tab prvote1 yhat_mod1_out if prvote1<2
* 95.07%

** Model 2 
xtprobit prvote1 rokkan2_svd  socialdem11912 skill_ratio second catholic right_margin  nonagri_ziblatt_new if prvote1<2, i(partyNUM)
estimates store mod22
predict yhat_mod2_lin
gen yhat_mod2_out= yhat_mod2_lin>0
tab prvote1 yhat_mod2_out if prvote1<2
* 95.07%


** Model 3
xtprobit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  nonagri_ziblatt_new if prvote1<2, i(partyNUM)
estimates store mod32
predict yhat_mod3_lin
gen yhat_mod3_out= yhat_mod3_lin>0
tab prvote1 yhat_mod3_out if prvote1<2
* 95.07%
* for fn comment: test socialdem11912+voteshare_second =0


** Model 4
xtprobit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  nonagri_ziblatt_new prussia bavaria sachsen wurttenberg baden if prvote1<2
estimates store mod42
predict yhat_mod4_lin
gen yhat_mod4_out= yhat_mod4_lin>0
tab prvote1 yhat_mod4_out if prvote1<2
* 96.13%

esttab modem mod12 mod22 mod32 mod42, b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second second  catholic nonagri_ziblatt_new skill_ratio  right_margin   prussia bavaria sachsen wurttenberg baden)
esttab modem mod12 mod22 mod32 mod42, b(3) se(3) label tex stats(wald N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second second  catholic nonagri_ziblatt_new skill_ratio  right_margin   prussia bavaria sachsen wurttenberg baden)


**************************************************************************************************
* ALL MODELS							- -	T A B L E  2&3 - - (tabel 2 in Paper)
*	(probit and hierarchical)
esttab modem mod1 mod2 mod3 mod4 mod12 mod22 mod32 mod42, b(3) se(3) label tex stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second second  catholic nonagri_ziblatt_new skill_ratio  right_margin   prussia bavaria sachsen wurttenberg baden)


**************************************************************************************************
* MODELS							- -	T A B L E  4 - -
*	(PMLE)


firthlogit prvote1 socialdem11912 conserv if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod421
* predict correctly?
* empty
tab prvote1 if (partyNUM==3|partyNUM==5) & prvote1<2
firthlogit prvote1 socialdem11912 conserv if (partyNUM==3|partyNUM==5) & prvote1<2
predict ylatentfirth if e(sample)
gen phatfirth = invlogit(ylatentfirth)
* no improvement over regular models

firthlogit prvote1 skill_ratio conserv if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod4211
*estat clas
firthlogit prvote1 socialdem11912 right_margin nonagri_ziblatt_new catholics conserv second if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod422
*estat clas
firthlogit prvote1 skill_ratio right_margin nonagri_ziblatt_new catholics conserv second if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod423
*estat clas
firthlogit prvote1 socialdem11912 skill_ratio right_margin nonagri_ziblatt_new catholics conserv second if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod424
predict ylatentfirth1 if e(sample)
gen phatfirth1 = invlogit(ylatentfirth1)


*estat clas
** remeber second perfect separation

esttab mod421 mod4211 mod422 mod423  mod424 , b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(socialdem11912 skill_ratio)
esttab mod421 mod4211 mod422 mod423  mod424 , tex b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(socialdem11912 skill_ratio)






************************
******
******
******
******
******	APPENDIX TABLES
******
******
******
******
******
************************





************************
******
******		SKILL ALL
******
************************




**************************************************************************************************
* MODELS							- -	T A B L E  5 - -
*	with skill_all
*	(all models with skill_ratio_agri)

label var skill_ratio_agri  "SKILL ALL"
set more off
* basic model - probit -- EMPTY 
probit prvote1  if prvote1<2
estimates store modem
estat clas

** Model 1
probit prvote1 rokkan2_svd  socialdem11912 skill_ratio_agri  if prvote1<2
estimates store mod1
estat clas
* 94.72%


** Model 2 
probit prvote1 rokkan2_svd  socialdem11912 skill_ratio_agri second catholic right_margin  nonagri_ziblatt_new if prvote1<2
estimates store mod2
estat clas
* 94.72%


** Model 3
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio_agri second catholic voteshare_right right_margin  nonagri_ziblatt_new if prvote1<2
estimates store mod3
estat clas
* 94.72%


** Model 4
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio_agri second catholic voteshare_right right_margin  nonagri_ziblatt_new prussia bavaria sachsen wurttenberg baden if prvote1<2
estimates store mod4
estat clas
* 96.48%


esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_ratio_agri  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)
esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label tex stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_ratio_agri  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)









**************************************************************************************************
* MODELS							- -	T A B L E  6 - -
*	(hierarchical -- with skill_ratio_agri; all skills)

set more off
drop yhat_mod1_out yhat_mod2_out yhat_mod3_out yhat_mod4_out yhat_mod1_lin yhat_mod2_lin yhat_mod3_lin yhat_mod4_lin
* basic model - probit -- EMPTY 
xtprobit prvote1  if prvote1<2, i(partyNUM)
estimates store modem

** Model 1
xtprobit prvote1 rokkan2_svd  socialdem11912 skill_ratio_agri  if prvote1<2, i(partyNUM)
estimates store mod1
predict yhat_mod1_lin
gen yhat_mod1_out= yhat_mod1_lin>0
tab prvote1 yhat_mod1_out if prvote1<2
* 94.36%

** Model 2 
xtprobit prvote1 rokkan2_svd  socialdem11912 skill_ratio_agri second catholic right_margin  nonagri_ziblatt_new if prvote1<2, i(partyNUM)
estimates store mod2
predict yhat_mod2_lin
gen yhat_mod2_out= yhat_mod2_lin>0
tab prvote1 yhat_mod2_out if prvote1<2
* 95.07%


** Model 3
xtprobit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio_agri second catholic voteshare_right right_margin  nonagri_ziblatt_new if prvote1<2, i(partyNUM)
estimates store mod3
predict yhat_mod3_lin
gen yhat_mod3_out= yhat_mod3_lin>0
tab prvote1 yhat_mod3_out if prvote1<2
* 94.71%

** Model 4
xtprobit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio_agri second catholic voteshare_right right_margin  nonagri_ziblatt_new prussia bavaria sachsen wurttenberg baden if prvote1<2
estimates store mod4
predict yhat_mod4_lin
gen yhat_mod4_out= yhat_mod4_lin>0
tab prvote1 yhat_mod4_out if prvote1<2
* 96.13%

esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_ratio_agri  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)
esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label tex stats(wald N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_ratio_agri  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)







************************
******
******		SKILL REGION
******
************************


*bysort largeregion: egen skill_region = mean(skill_ratio)



**************************************************************************************************
* MODELS							- -	T A B L E  8 - -
*	with skill_all
*	(all models with skill_ratio_agri)

label var skill_ratio_agri  "SKILL ALL"
set more off
* basic model - probit -- EMPTY 
probit prvote1  if prvote1<2
estimates store modem
estat clas

** Model 1
probit prvote1 rokkan2_svd  socialdem11912 skill_region  if prvote1<2
estimates store mod1
estat clas
* 95.07%


** Model 2 
probit prvote1 rokkan2_svd  socialdem11912 skill_region second catholic right_margin  nonagri_ziblatt_new if prvote1<2
estimates store mod2
estat clas
* 95.07%


** Model 3
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_region second catholic voteshare_right right_margin  nonagri_ziblatt_new if prvote1<2
estimates store mod3
estat clas
* 94.72%


** Model 4
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_region second catholic voteshare_right right_margin  nonagri_ziblatt_new prussia bavaria sachsen wurttenberg baden if prvote1<2
estimates store mod4
estat clas
* 96.83%


esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_region  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)
esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label tex stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_region  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)







**************************************************************************************************
* MODELS							- -	T A B L E  9 - -
*	(hierarchical -- with skill_ratio_agri; all skills)

set more off
drop yhat_mod1_out yhat_mod2_out yhat_mod3_out yhat_mod4_out yhat_mod1_lin yhat_mod2_lin yhat_mod3_lin yhat_mod4_lin
* basic model - probit -- EMPTY 
xtprobit prvote1  if prvote1<2, i(partyNUM)
estimates store modem

** Model 1
xtprobit prvote1 rokkan2_svd  socialdem11912 skill_region  if prvote1<2, i(partyNUM)
estimates store mod1
predict yhat_mod1_lin
gen yhat_mod1_out= yhat_mod1_lin>0
tab prvote1 yhat_mod1_out if prvote1<2
* 93.66%

** Model 2 
xtprobit prvote1 rokkan2_svd  socialdem11912 skill_region second catholic right_margin  nonagri_ziblatt_new if prvote1<2, i(partyNUM)
estimates store mod2
predict yhat_mod2_lin
gen yhat_mod2_out= yhat_mod2_lin>0
tab prvote1 yhat_mod2_out if prvote1<2
* 92.96%


** Model 3
xtprobit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_region second catholic voteshare_right right_margin  nonagri_ziblatt_new if prvote1<2, i(partyNUM)
estimates store mod3
predict yhat_mod3_lin
gen yhat_mod3_out= yhat_mod3_lin>0
tab prvote1 yhat_mod3_out if prvote1<2
* 93.31%

** Model 4
xtprobit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_region second catholic voteshare_right right_margin  nonagri_ziblatt_new prussia bavaria sachsen wurttenberg baden if prvote1<2
estimates store mod4
predict yhat_mod4_lin
gen yhat_mod4_out= yhat_mod4_lin>0
tab prvote1 yhat_mod4_out if prvote1<2
* 96.48%

esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_region  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)
esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label tex stats(wald N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_region  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)








************************
******
******		P O P U L A T I O N   S I Z E
******
************************




label var skill_ratio_agri  "SKILL ALL"
set more off
* basic model - probit -- EMPTY 
probit prvote1  if prvote1<2
estimates store modem
estat clas

** Model 1
probit prvote1 rokkan2_svd  socialdem11912 skill_ratio  population if prvote1<2
estimates store mod1
estat clas
* 94.72%


** Model 2 
probit prvote1 rokkan2_svd  socialdem11912 skill_ratio second catholic right_margin  nonagri_ziblatt_new  population  if prvote1<2
estimates store mod2
estat clas
* 94.72%%


** Model 3
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  nonagri_ziblatt_new  population  if prvote1<2
estimates store mod3
estat clas
* 95.07%


** Model 4
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  nonagri_ziblatt_new  population  prussia bavaria sachsen wurttenberg baden if prvote1<2
estimates store mod4
estat clas
*  96.48%



set more off

drop yhat_mod1_out yhat_mod2_out yhat_mod3_out yhat_mod4_out yhat_mod1_lin yhat_mod2_lin yhat_mod3_lin yhat_mod4_lin

** Model 1
xtprobit prvote1 rokkan2_svd  socialdem11912 skill_ratio    population  if prvote1<2, i(partyNUM)
estimates store mod1h
predict yhat_mod1_lin
gen yhat_mod1_out= yhat_mod1_lin>0
tab prvote1 yhat_mod1_out if prvote1<2
* 94.72%

** Model 2 
xtprobit prvote1 rokkan2_svd  socialdem11912 skill_ratio second catholic right_margin  nonagri_ziblatt_new   population if prvote1<2, i(partyNUM)
estimates store mod2h
predict yhat_mod2_lin
gen yhat_mod2_out= yhat_mod2_lin>0
tab prvote1 yhat_mod2_out if prvote1<2
* 94.72%


** Model 3
xtprobit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  nonagri_ziblatt_new   population  if prvote1<2, i(partyNUM)
estimates store mod3h
predict yhat_mod3_lin
gen yhat_mod3_out= yhat_mod3_lin>0
tab prvote1 yhat_mod3_out if prvote1<2
* 95.42%

** Model 4
xtprobit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  nonagri_ziblatt_new prussia bavaria sachsen wurttenberg baden   population if prvote1<2
estimates store mod4h
predict yhat_mod4_lin
gen yhat_mod4_out= yhat_mod4_lin>0
tab prvote1 yhat_mod4_out if prvote1<2
* 96.13%

esttab modem mod1 mod2 mod3 mod4 mod1h mod2h mod3h mod4h, b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_ratio  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden  population )
esttab modem mod1 mod2 mod3 mod4 mod1h mod2h mod3h mod4h, b(3) se(3) label tex stats(wald N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_ratio  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden  population )






************************
******
******		S K I L L S   A S   P A R T Y   L E V E L
******
************************




**************************************************************************************************
* MODELS							- -	T A B L E  12 - -
*	(hierarchical -- with skills as party level variable)

set more off
drop yhat_mod1_out yhat_mod2_out yhat_mod3_out yhat_mod4_out yhat_mod1_lin yhat_mod2_lin yhat_mod3_lin yhat_mod4_lin
* basic model - probit -- EMPTY 
xtprobit prvote1  if prvote1<2&partyNUM!=1, i(partyNUM)
estimates store modem

** Model 1
xtprobit prvote1 rokkan2_svd  socialdem11912 skills_party  if prvote1<2&partyNUM!=1, i(partyNUM)
estimates store mod1
predict yhat_mod1_lin
gen yhat_mod1_out= yhat_mod1_lin>0
tab prvote1 yhat_mod1_out if prvote1<2
* 94.72%

** Model 2 
xtprobit prvote1 rokkan2_svd  socialdem11912 skills_party second catholic right_margin  nonagri_ziblatt_new if prvote1<2&partyNUM!=1, i(partyNUM)
estimates store mod2
predict yhat_mod2_lin
gen yhat_mod2_out= yhat_mod2_lin>0
tab prvote1 yhat_mod2_out if prvote1<2
* 94.01%


** Model 3
xtprobit prvote1 rokkan2_svd  socialdem11912 voteshare_second skills_party second catholic voteshare_right right_margin  nonagri_ziblatt_new if prvote1<2, i(partyNUM)
estimates store mod3
predict yhat_mod3_lin
gen yhat_mod3_out= yhat_mod3_lin>0
tab prvote1 yhat_mod3_out if prvote1<2
* 95.07%

** Model 4
xtprobit prvote1 rokkan2_svd  socialdem11912 voteshare_second skills_party second catholic voteshare_right right_margin  nonagri_ziblatt_new prussia bavaria sachsen wurttenberg baden if prvote1<2
estimates store mod4
predict yhat_mod4_lin
gen yhat_mod4_out= yhat_mod4_lin>0
tab prvote1 yhat_mod4_out if prvote1<2
* 96.13%

esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skills_party  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)
esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label tex stats(wald N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skills_party  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)






************************
******
******		W / O   L E F T   P O L I T I C I A N S
******
************************



set more off
* basic model - probit -- EMPTY 
probit prvote1  if prvote1<2&partyNUM!=1
estimates store modem
estat clas

** Model 1
probit prvote1 rokkan2_svd  socialdem11912 skill_ratio   if prvote1<2&partyNUM!=1
estimates store mod1
estat clas
* 94.72%


** Model 2 
probit prvote1 rokkan2_svd  socialdem11912 skill_ratio second catholic right_margin  nonagri_ziblatt_new  if prvote1<2&partyNUM!=1
estimates store mod2
estat clas
* 94.72%%


** Model 3
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  nonagri_ziblatt_new   if prvote1<2&partyNUM!=1
estimates store mod3
estat clas
* 95.07%


** Model 4
probit prvote1 rokkan2_svd  socialdem11912 voteshare_second skill_ratio second catholic voteshare_right right_margin  nonagri_ziblatt_new   prussia bavaria sachsen wurttenberg baden if prvote1<2&partyNUM!=1
estimates store mod4
estat clas
*  96.48%



esttab modem mod1 mod2 mod3 mod4, b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_ratio  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden )
esttab modem mod1 mod2 mod3 mod4 , b(3) se(3) label tex stats(wald N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(rokkan2_svd socialdem11912 voteshare_second voteshare_right right_margin second  skill_ratio  catholic nonagri_ziblatt_new    prussia bavaria sachsen wurttenberg baden)






************************
******
******		R O B U S T N E S S   F O R   P A R T Y   D E F E C T I O N
******
************************


*	(only Zentrum)


set more off
firthlogit prvote1 socialdem11912 if (partyNUM==3) & prvote1<2
est sto mod421
*estat clas
firthlogit prvote1 skill_ratio_agri if (partyNUM==3) & prvote1<2
est sto mod4211
*estat clas
firthlogit prvote1 socialdem11912 right_margin nonagri_ziblatt_new catholics second if (partyNUM==3) & prvote1<2
est sto mod422
*estat clas
firthlogit prvote1 skill_ratio_agri right_margin nonagri_ziblatt_new catholics second if (partyNUM==3) & prvote1<2
est sto mod423
*estat clas
firthlogit prvote1 socialdem11912 skill_ratio_agri right_margin nonagri_ziblatt_new catholics second if (partyNUM==3) & prvote1<2
est sto mod424
*estat clas
** remeber second perfect separation

esttab mod421 mod4211 mod422 mod423  mod424 , b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(socialdem11912 skill_ratio_agri)
esttab mod421 mod4211 mod422 mod423  mod424 , tex b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(socialdem11912 skill_ratio_agri)



*	(alternative skill measure)


set more off
firthlogit prvote1 socialdem11912 conserv if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod421
*estat clas
firthlogit prvote1 skill_ratio_agri conserv if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod4211
*estat clas
firthlogit prvote1 socialdem11912 right_margin nonagri_ziblatt_new catholics conserv second if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod422
*estat clas
firthlogit prvote1 skill_ratio_agri right_margin nonagri_ziblatt_new catholics conserv second if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod423
*estat clas
firthlogit prvote1 socialdem11912 skill_ratio_agri right_margin nonagri_ziblatt_new catholics conserv second if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod424
*estat clas
** remeber second perfect separation

esttab mod421 mod4211 mod422 mod423  mod424 , b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(socialdem11912 skill_ratio_agri)
esttab mod421 mod4211 mod422 mod423  mod424 , tex b(3) se(3) label stats(r2_p N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(socialdem11912 skill_ratio_agri)




*	(linear model)
set more off
reg prvote1 socialdem11912 conserv if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod421
*estat clas
reg prvote1 skill_ratio conserv if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod4211
*estat clas
reg prvote1 socialdem11912 right_margin nonagri_ziblatt_new catholics conserv second if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod422
*estat clas
reg prvote1 skill_ratio right_margin nonagri_ziblatt_new catholics conserv second if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod423
*estat clas
reg prvote1 socialdem11912 skill_ratio right_margin nonagri_ziblatt_new catholics conserv second if (partyNUM==3|partyNUM==5) & prvote1<2
est sto mod424
*estat clas
** remeber second perfect separation

esttab mod421 mod4211 mod422 mod423  mod424 , b(3) se(3) label stats(r2 N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(socialdem11912 skill_ratio)
esttab mod421 mod4211 mod422 mod423  mod424 , tex b(3) se(3) label stats(r2 N  ll chi2 p bic)   star(* 0.10 ** 0.05 *** 0.01) order(socialdem11912 skill_ratio)





********



********



********



********

